package singleton.practice_01;

import java.util.concurrent.TimeUnit;

/**
 * @author yi qiang
 * @date 2021/9/12 15:16
 */
public class SingletonType03 {

    public static void main(String[] args) {
        while(true){
            try {
                TimeUnit.SECONDS.sleep(5000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            Singleton6.INSTANCE.test();
        }

    }


}

enum Singleton6 {
    /**
     * 单例
     */
    INSTANCE();

    Singleton6() {

    }

    public void test() {
        System.out.println("test");
    }
}
